* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f0e8;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 1000px;
    width: 100%;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.screen {
    padding: 30px;
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

h1, h2, h3 {
    color: #6b4226;
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid #d9b38c;
    padding-bottom: 10px;
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
}

.intro {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    padding: 0 20px;
}

.btn {
    background-color: #8b5a2b;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #6b4226;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 66, 38, 0.3);
}

.question-container {
    margin: 30px auto;
    max-width: 600px;
}

label[for="question"] {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #6b4226;
}

textarea#question {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 2px solid #d9b38c;
    border-radius: 10px;
    font-size: 1rem;
    resize: none;
}

/* 洗牌动画 */
.shuffling-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    position: relative;
}

.card {
    width: 120px;
    height: 200px;
    background-color: #d2b48c;
    border-radius: 10px;
    position: absolute;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    /* 使用CSS渐变替代外部图片 */
    background-image: linear-gradient(135deg, #8b5a2b 0%, #d2b48c 50%, #8b5a2b 100%);
    background-size: cover;
    background-position: center;
}

/* 洗牌动画修复 */
.card-1 {
    transform: rotate(-15deg);
    animation: shuffle 1.5s infinite alternate;
}

.card-2 {
    transform: rotate(0deg);
    animation: shuffle 1.5s 0.2s infinite alternate;
}

.card-3 {
    transform: rotate(15deg);
    animation: shuffle 1.5s 0.4s infinite alternate;
}

/* 修复洗牌动画关键帧，确保所有卡牌动画一致 */
@keyframes shuffle {
    0% { transform: translateY(0) rotate(-15deg); }
    100% { transform: translateY(-20px) rotate(-10deg); }
}

/* 为不同卡牌添加各自的动画关键帧 */
@keyframes shuffle-1 {
    0% { transform: translateY(0) rotate(-15deg); }
    100% { transform: translateY(-20px) rotate(-10deg); }
}

@keyframes shuffle-2 {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes shuffle-3 {
    0% { transform: translateY(0) rotate(15deg); }
    100% { transform: translateY(-25px) rotate(20deg); }
}

.shuffling-animation p {
    position: absolute;
    bottom: 50px;
    font-style: italic;
    color: #6b4226;
}

/* 牌阵选择 */
.spread-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.spread-option {
    background-color: #fff8f0;
    border: 2px solid #d9b38c;
    border-radius: 10px;
    padding: 20px;
    width: 250px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spread-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #8b5a2b;
}

.spread-option h3 {
    color: #8b5a2b;
    margin-bottom: 10px;
}

/* 结果展示 */
#question-display {
    background-color: #fff8f0;
    padding: 15px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 600px;
    font-style: italic;
    border-left: 4px solid #d9b38c;
}

#spread-result {
    margin: 30px auto;
    max-width: 900px;
}

.card-result {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.card-image {
    width: 100px;
    height: 160px;
    background-color: #d2b48c;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
}

.card-info h4 {
    color: #8b5a2b;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card-info p {
    line-height: 1.6;
}

/* 添加六芒星阵布局样式 */
.six-pointed-star {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 10px;
    max-width: 800px;
    margin: 40px auto;
    height: 500px;
}

.six-pointed-star .card-result {
    margin: 0;
    width: 100%;
}

.star-position-1 { /* 当前状况 */
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
}

.star-position-2 { /* 挑战 */
    grid-column: 5;
    grid-row: 3;
    justify-self: center;
}

.star-position-3 { /* 潜意识影响 */
    grid-column: 2;
    grid-row: 2;
    justify-self: center;
}

.star-position-4 { /* 过去的影响 */
    grid-column: 2;
    grid-row: 4;
    justify-self: center;
}

.star-position-5 { /* 未来的可能 */
    grid-column: 4;
    grid-row: 4;
    justify-self: center;
}

.star-position-6 { /* 最终结果 */
    grid-column: 3;
    grid-row: 5;
    justify-self: center;

    /* 移动端六芒星阵适配 */
    .six-pointed-star {
        display: flex;
        flex-direction: column;
        height: auto;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .card-result {
        flex-direction: column;
        text-align: center;
    }

    .spread-options {
        flex-direction: column;
        align-items: center;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}